var babyMaster = {
    preLoader: function () {
        var start_time = new Date();
        var imageSources = [];
        $('img').each(function () {
            var sources = $(this).attr('src');
            imageSources.push(sources);
        });
        $(".pre-loader").bind("click", function () {
            $('.pre-loader').fadeOut('slow');
        });
        setTimeout(function () { //超过15秒
            $('.pre-loader').fadeOut('slow');
        }, 15000);
        if ($(imageSources).load()) {
            var time = new Date() - start_time;
            if (time < 2000) {
                time = 2000 - time;
            } else {
                time = 0;
            }
            setTimeout(function () {
                $('.pre-loader').fadeOut('slow');
            }, time);
        }
    },
    swiperHead: function () {
        var swiper = new Swiper('.swiper-container',{
            pagination: '.swiper-pagination',
            paginationClickable: true,
            nextButton: '.swiper-button-next',
            prevButton: '.swiper-button-prev',
            parallax: true,
            speed: 600
        });
        var docHeight = $(window).height();
        $("#home").css("height", docHeight-200);
    },
    maxSize: function (name) {
        var docHeight = $(window).height();
        $(name).css("height", docHeight);
    },
    placeHold: function () {
        Placeholdem(document.querySelectorAll('[placeholder]'));
    }
}; // babyMaster


